import App from './App'
import {
	createSSRApp
} from 'vue'
import {
	createPinia
} from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist' //引入pinia数据持久化插件
// 全局拦截器
import httpInterceptor from '/config/request.js'
// 全局API
import httpApi from '/config/api.js'
import uView from './uni_modules/vk-uview-ui'
import 'default-passive-events'
export function createApp() {
	const app = createSSRApp(App)
	const pinia = createPinia()
	pinia.use(piniaPluginPersist)
	app.use(pinia)
	app.use(uView)
	app.use(httpInterceptor)
	app.use(httpApi)
	return {
		app,
		pinia
	}
}